<template>
  <view class="empry-wrap">
    <up-empty
      :mode="mode"
      :icon="icon"
      :text="text"
      :textColor="textColor"
      :textSize="textSize"
      :width="width"
      :height="height"
      :="$attrs"
    ></up-empty>
  </view>
</template>

<script setup>
defineOptions({
  name: 'Emptylist',
  inheritAttrs: false
})

const props = defineProps({
  mode: {
    type: String,
    default: 'list'
  },
  icon: {
    type: String,
    default: getViteImageUrl('emptylist.png')
  },
  text: {
    type: String,
    default: '列表为空'
  },
  textColor: {
    type: String,
    default: '#999'
  },
  textSize: {
    type: [String, Number],
    default: g_utils.rpxToPx(24)
  },
  width: {
    type: [String, Number],
    default: g_utils.rpxToPx(390 * 0.6)
  },
  height: {
    type: [String, Number],
    default: g_utils.rpxToPx(320 * 0.6)
  }
})
</script>

<style lang="scss" scoped>
.empry-wrap {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
</style>
